﻿Chenxin.UI.ShowListIntentMoneyPrint = Chenxin.extend(Chenxin.UI.PageCommon, {
    autoInitForm: false,
    actionUrl: '/service/logic/ShowListIntentMoneyPrint.ashx',
    createSearch: function() {
        return new Chenxin.UI.ShowListIntentMoneyPrintSearch({
            scope: this
        });
    },
    createGrid: function() {
        return new Chenxin.UI.JsonGrid({
            actionUrl: this.actionUrl + '?op=getlist',
            pageSize: 100,
            hasPage: true,
            exportAble: false,
            cellBorder: true,
            height: 400,
            autoLoad: false,
            renderTo: 'IntentMoneyPrint_table',
            hasCheckBox: false,
            id: 'searchtable',
            title: '单据打印记录',
            scope: this,
            columns: {
                IntentionCode: {
                    width: 200,
                    head: '单据编号',
                    sortable: true
                },
                PrintEmployee: {
                    width: 200,
                    head: '打印人',
                    sortable: true
                },
                PrintTime: {
                    width: 140,
                    head: '打印时间',
                    sortable: true,
                    renderer: function(val, field, row) {
                        return val.split(' ')[0];
                    }
                }
            }
        });
    },
    initComponent: function() {
        Chenxin.UI.ShowListIntentMoneyPrint.superclass.initComponent.call(this);
    }
});

/**
*查询面板
*/
Chenxin.UI.ShowListIntentMoneyPrintSearch = Chenxin.extend(Chenxin.UI.SearchCommon, {
    id: 'IntentMoneyPrint_search',
    initEvent: function() {
        var _this = this;

        //查询按钮
        $('#btnSreach').click(function() {
            _this.scope.reloadGrid("", 0);
        });
        $('#txtword').defText({
            deftxt: '请输入意向金/服务费编号'
        });
    },
    createComboList: function() {

        //用户操作日志类型
        var type = new Chenxin.UI.Combo({
            containerId: '#billtype',
            tbxWidth: 70,
            items: [{ txt: '意向金', val: '10' }, {txt:'服务费',val:'20'}],
            addPleaseSelected: false
        });
        return [type];
    },
    initComponent: function() {
        Chenxin.UI.ShowListIntentMoneyPrintSearch.superclass.initComponent.call(this);
    }
});

$(document).ready(function() {
    this.ShowListIntentMoneyPrint = new Chenxin.UI.ShowListIntentMoneyPrint();
});